package org.liveboardgames.agricola.control.delegates.mock.cards.actioncards
{
	import org.liveboardgames.agricola.control.delegates.mock.ActionFactory;
	import org.liveboardgames.agricola.view.component.ImageHandler;
	import org.liveboardgames.agricola.vo.action.Action;
	import org.liveboardgames.agricola.vo.card.ActionCard;
	
	import mx.collections.ArrayCollection;
	import mx.collections.ListCollectionView;
	
	public class PeriodFiveCards
	{
		public static const PLOUGH_ANDOR_SOW:ActionCard = getPloughSowCard();
		public static const BIRTH_WITHOUT_ROOM:ActionCard = getBirthWithoutRoomCard();
		
		private static function getPloughSowCard():ActionCard 
		{
			var card:ActionCard = new ActionCard();
			card.cardName = "Plow and/or sow";
			card.imagePath = ImageHandler.ACTIONS + "SowAndOrPlow.png";
			
			// Build the actions
			var ploughAction:Action = ActionFactory.getPloughAction();			
			var sowAction:Action = ActionFactory.getSowAction();
			
			var actions:ListCollectionView = new ArrayCollection();
			actions.addItem(ploughAction);
			actions.addItem(sowAction);
			
			card.actions = actions;
			return card;
		}
		
		private static function getBirthWithoutRoomCard():ActionCard 
		{
			var card:ActionCard = new ActionCard();
			card.cardName = "Birth without room";
			card.imagePath = ImageHandler.ACTIONS + "BirthWithoutRoom.png";
			
			// Build the actions
			var actions:ListCollectionView = new ArrayCollection();
			
			// Birth
			var birth:Action = ActionFactory.getBirthWithoutRoomAction();
			birth.link = card;
			
			actions.addItem(birth);
			
			card.actions = actions;
			return card;
		}
		

	}
}